﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>method_1.html</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <script type="text/javascript" src="../js/jquery-1.8.2.js"></script>
  </head>
  <body>
	<form>
		<table>
			<tr>
				<td>
					<input type="text" name="username" value="张三"/>
				</td>
				<td>
					<input type="password" name="password" value="123456"/>
				</td>
			</tr>
		</table>
	</form>
	
	<script type="text/javascript">
		//取得form里第一个input元素的type属性
		//alert( $("form input:first").attr("type") );
		
		//设置form里最后个input元素的为只读文本框
		//$("form input:last").attr("readonly","readonly")
		//$(":password").attr("readonly","readonly")
		
	</script>
	
  </body>
</html>




